package com.tju.Model;


import org.apache.commons.lang.StringUtils;

/**
 * Created by Search on 2016/12/4.
 */
public enum RoleType {
    ROLE_ADMIN(1),ROLE_COMMON(2),ROLE_USER(3);

    private Integer roleType;

    public Integer getRoleType()
    {
        return this.roleType;
    }

    public void setQueryType(Integer roleType)
    {
        this.roleType = roleType;
    }


    RoleType(Integer roleType)
    {
        this.roleType = roleType;
    }

    public static boolean isContain(Integer roleType)
    {
        if(StringUtils.isNotEmpty(roleType+""))
        {
            for (RoleType c : RoleType.values()) {
                if (c.getRoleType().equals(roleType)) {
                    return true;
                }
            }
        }
        return false;
    }
}
